<?php
/**
 * Created by PhpStorm.
 * User: hy
 * Date: 2018/7/31
 * Time: 14:59
 */

//    $id= \Yii::$app->request->get(id);
//$id = $_POST["id"];
$connection = \Yii::$app->db;


?>

<html>
<head>
    <meta charset="utf-8">
    <title>我该如何使用</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/site.css">
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-4 logol1">
            <a href="<?php echo \yii\helpers\Url::toRoute('index')?>">
                <h4 class="logol2">tower</h4>
            </a>
        </div>
        <div class="col-md-4 nav2">
            <ul class="nav nav-pills nav1">
                <li role="presentation"><a href="#">价格</a></li>
                <li role="presentation"><a href="#">快速入门</a></li>
                <li role="presentation">
                    <div class="dropdown" id="resource">
                        <a data-target="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                            资源
                            <span class="caret"></span>
                            <ul class="nav nav-pills dropdown-menu nav1" aria-labelledby="dLabel">
                                <li><a data-target="#">帮助中心</a></li>
                                <li><a data-target="#">功能日志</a></li>
                                <li><a data-target="#">下载客户端</a></li>
                                <li><a data-target="#">企业微信</a></li>
                                <li><a data-target="#">企业服务精选</a></li>
                                <li><a data-target="#">@Towerim</a></li>
                                <li><a data-target="#">Tower公众号</a></li>
                            </ul>
                        </a>
                    </div>
                </li>
            </ul>
        </div>
        <div class="col-md-4 nav2">
            <button class="btn btn1 enter"><a href="#">进入 Tower</a></button>
        </div>
    </div>
</div>
<!-- <div class="container"> -->
<div class="route1">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--    <a href="index.php">问题分类</a>-->
    <a href="<?php echo  \yii\helpers\Url::toRoute('index');?>">问题分类</a>
    <span>&nbsp;>&nbsp;</span>
    <a href="<?php echo \yii\helpers\Url::toRoute('use')?>">我该如何使用__ __？</a>
</div>
<!-- </div> -->

<?php
$command = $connection->createCommand('SELECT * FROM article');
$article = $command->queryAll();
echo "<div style='text-align: center'>";
foreach ($article as $item){
    echo $item['id']."&nbsp;&nbsp;&nbsp;";
    echo $item['que_id']."<br>";
}
echo "</div>";
?>

<div class="main">
    <h2><?php
        $id = $_GET['id'];
        $command = $connection->createCommand('SELECT * FROM question WHERE id = 6');
        $post = $command->queryOne();
        echo $post['title'];
        ?></h2><br>
        <a href="<?php echo \yii\helpers\Url::toRoute('video');?>">
            <?php
            $command = $connection->createCommand('SELECT title FROM article where que_id=6');
            $question = $command->queryColumn();
            foreach ($question as $value)
            {
                echo $value."<br><br>";
            }
            ?>
        </a><br><br>

    <a href="<?php echo  \yii\helpers\Url::toRoute('video');?>">
        <?php
        $command = $connection->createCommand('SELECT * FROM article WHERE que_id= 6');
        $article = $command->queryOne();
        echo $article['title'];
        ?>
    </a><br><br>
    <a href="<?php echo  \yii\helpers\Url::toRoute('video');?>">如何使用 API 功能？</a><br><br>
    <a href="<?php echo  \yii\helpers\Url::toRoute('video');?>">如何邀请成员加入 Tower</a><br><br>
    <a href="<?php echo  \yii\helpers\Url::toRoute('video');?>">如何使用 Webhooks 功能？</a><br><br>
    <a href="<?php echo  \yii\helpers\Url::toRoute('video');?>">入门视频教程</a>
</div>
<br><br><br>
<div class="container">
    <div class="row main2">
        <div class="col-md-8 mLeft">
            <h4 class="answer">没有找到需要的答案？</h4>
            <h6 class="help">或许我们的在线客服可以帮上忙。</h6>
        </div>
        <div class="col-md-4 service">
            <!-- <button type="button" class="btn btn-success" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
-->		 	 <button class="btn btn-success btn1">联系在线客服</button>
        </div>
    </div>
</div>
<br><br><br><br><br><br><br><br><br>
<footer class="footer">
    <div class="container">
			<span class="p2">
					<a href="#">服务条款</a>&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="#">付费方案</a>&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="#">帮助中心</a>&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="#">功能日志</a>
			</span>
        <br><br>
        <!-- <ul>
            <li><a href="#">服务条款</a></li>
            <li><a href="#">付费方案</a></li>
            <li><a href="#">帮助中心</a></li>
            <li><a href="#">功能日志</a></li>
        </ul> -->
        <p class="p1">
            川B2-20130052 &nbsp; 蜀ICP备12019256号-5 &nbsp; © Mycolorway Design.
        </p>
    </div>
</footer>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>